#include "UtilityPCH.h"
#include "UT_BRDFLambertian.h"
#include "UT_MathDefine.h"

using namespace Utility;
//--------------------------------------------------------------------
UT_BRDF_Lambertian::UT_BRDF_Lambertian(const UT_SpectrumUsed& rkReflectance)
	: UT_BxDFBase(BxDFType(BSDF_REFLECTION | BSDF_DIFFUSE))
	, m_kReflective(rkReflectance)
{

}
//--------------------------------------------------------------------
UT_SpectrumUsed UT_BRDF_Lambertian::f(const UT_Vec3Float& wo, const UT_Vec3Float& wi) const
{
	return m_kReflective * UT_MathDefine::_INV_PI;
}
//--------------------------------------------------------------------
UT_SpectrumUsed UT_BRDF_Lambertian::rho(const UT_Vec3Float& wo, int32_t nSamples, const float *samples) const
{
	return m_kReflective;
}
//--------------------------------------------------------------------
UT_SpectrumUsed UT_BRDF_Lambertian::rho(int nSamples, const float *samples1, const float *samples2) const
{
	return m_kReflective;
}
//--------------------------------------------------------------------